package com.cskt.petproject178.config;

import com.cskt.petproject178.handler.Authenticationhandler;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * web配置
 *
 * @author 27013
 **/

@Configuration
public class WebmvcConfig implements WebMvcConfigurer {
    @Resource
    private Authenticationhandler authenticationhandler;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       registry.addInterceptor(authenticationhandler).addPathPatterns("/**");
    }
}
